package com.project.m.api.busi.db.entity.hicatcard.card;

import com.project.m.api.busi.db.entity.hicatcard.BaseEntity;
import com.project.m.api.busi.util.annotation.StringDateFormat;
import com.project.m.api.busi.util.TimeUtil;

import javax.persistence.*;

@Entity
@Table(name = "t_card")
public class TCard extends BaseEntity {

    public static final String STATUS_SHOW = "1"; // 显示
    public static final String STATUS_HIDE = "0"; // 隐藏

    public static final String CHANGE_PAGE_STATUS_SHOW = "1";   //可以兑换
    public static final String CHANGE_PAGE_STATUS_NOT_SHOW = "0";   //不可以兑换

    public static final String LOCK_STATUS_IN_USE = "1";        //状态在用
    public static final String LOCK_STATUS_NOT_IN_USE = "0";    //状态不在用

    public static final String TYPE_CAR_WASH = "1";    //洗车卡
    public static final String TYPE_MASTER = "2";    //万能卡
    public static final String TYPE_THIRD_PARTY = "3";    //第三方卡片

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "CARD_ID")
    private Long cardId;

    @Column(name = "CARD_NAME")
    private String cardName;

    @Column(name = "TYPE")
    private String type;

    @Column(name = "GAIN_BACKGROUND_URL")
    private String gainBackgroundUrl;

    @Column(name = "DETAIL_BACKGROUND_URL")
    private String detailBackgroundUrl;

    @Column(name = "PICTURE_URL")
    private String pictureUlr;

    @Column(name = "ORDERNUM")
    private Long ordernum;

    @Column(name = "EFFECTIVE_DAY")
    private Integer effectiveDay;

    @Column(name = "FEE")
    private Integer fee;

    @Column(name = "COUPON_ID")
    private Long couponId;

    @Column(name = "MERCHANT_ID")
    private String merchantId;

    @Column(name = "DETAIL")
    private String detail;

    @Column(name = "STATUS")
    private String status;

    @Column(name = "LOCK_STATUS")
    private String lockStatus;

    @Column(name = "LOCK_START_TIME")
    private String lockStartTime;

    @Column(name = "LOCK_END_TIME")
    private String lockEndTime;

    @Column(name = "CARDBAG_URL")
    private String cardbagUrl;

    @Column(name = "CHANGEPAGESTATUS")
    private String changepagestatus;

    @Column(name = "CREATOR")
    private String creator;

    @StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
    @Column(name = "CREATE_TIME")
    private String createTime;

    @StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
    @Column(name = "UPDATE_TIME")
    private String updateTime;

    @Column(name = "ENABLE")
    private boolean enable = Boolean.TRUE;

    public Long getCardId() {
        return cardId;
    }

    public void setCardId(Long cardId) {
        this.cardId = cardId;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGainBackgroundUrl() {
        return gainBackgroundUrl;
    }

    public void setGainBackgroundUrl(String gainBackgroundUrl) {
        this.gainBackgroundUrl = gainBackgroundUrl;
    }

    public String getDetailBackgroundUrl() {
        return detailBackgroundUrl;
    }

    public void setDetailBackgroundUrl(String detailBackgroundUrl) {
        this.detailBackgroundUrl = detailBackgroundUrl;
    }

    public String getPictureUlr() {
        return pictureUlr;
    }

    public void setPictureUlr(String pictureUlr) {
        this.pictureUlr = pictureUlr;
    }

    public Long getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(Long ordernum) {
        this.ordernum = ordernum;
    }

    public Integer getEffectiveDay() {
        return effectiveDay;
    }

    public void setEffectiveDay(Integer effectiveDay) {
        this.effectiveDay = effectiveDay;
    }

    public Integer getFee() {
        return fee;
    }

    public void setFee(Integer fee) {
        this.fee = fee;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getChangepagestatus() {
        return changepagestatus;
    }

    public void setChangepagestatus(String changepagestatus) {
        this.changepagestatus = changepagestatus;
    }

    public String getLockStatus() {
        return lockStatus;
    }

    public void setLockStatus(String lockStatus) {
        this.lockStatus = lockStatus;
    }

    public String getLockStartTime() {
        return lockStartTime;
    }

    public void setLockStartTime(String lockStartTime) {
        this.lockStartTime = lockStartTime;
    }

    public String getLockEndTime() {
        return lockEndTime;
    }

    public void setLockEndTime(String lockEndTime) {
        this.lockEndTime = lockEndTime;
    }

    public String getCardbagUrl() {
        return cardbagUrl;
    }

    public void setCardbagUrl(String cardbagUrl) {
        this.cardbagUrl = cardbagUrl;
    }
}
